package com.blb.ssm.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.blb.ssm.dao.DepotMapper;
import com.blb.ssm.service.DepotService;

@Service
public class DepotServiceImpl implements DepotService {
	
	@Autowired
	private DepotMapper depotMapper;
	
	/**
	 * 分页、条件查询
	 */
	@Override
	public List<Map<String, Object>> getAllList(String gcode, String gname, int page, int limit,int a) {
		int start=(page-1)*limit;
		return depotMapper.getAllList(gcode,gname,start,limit,a);
	}
	
	/**
	 * 获取数据总条数
	 */
	@Override
	public int getCount(String gcode, String gname,int a) {
		return depotMapper.getCount(gcode,gname,a);
	}	
	//##################################
	//汇总
	/**
	 * 分页、条件查询
	 */
	@Override
	public List<Map<String, Object>> getAllList2(String gcode, String gname, int page, int limit,int a) {
		int start=(page-1)*limit;
		return depotMapper.getAllList2(gcode,gname,start,limit,a);
	}

	@Override
	public int getCount12(String gcode, String gname,int a) {
		return depotMapper.getCount12(gcode,gname,a);
	}
}
